package com.springbootstudy.demo.web;

import com.springbootstudy.demo.test.Person2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
public class BeanController {


    @Autowired
    Person2 Person;

    @ResponseBody
    @RequestMapping("/bean2222")
    public String bean222(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        request.getRequestDispatcher("/templates/login.html").forward(request, response);

        return "111" ;
    }
}
